Support Lelo F1s V3 as Harmony protocol - #920
Conversation
|
I wonder if my v3 is of an earlier generation that did support the original control structure too... |
a6e3603 to
c22ad03
Compare
|
Hi all, I am having an issue here as well and claude told me to comment this: Thanks |
c22ad03 to
81be9bb
Compare
|
This PR has been updated and rebased on current Summary of the current patch:
Runtime testing on a physical LELO F1S V3 confirmed that vibration output works with this implementation. The implementation also includes an optional smoothing/filtering path for very rapid vibration changes. This is intended to improve behavior with dense beat/script patterns where the device can otherwise miss short pulses or produce gaps. The Validation performed locally:
The PR branch was force-pushed to replace the older conflicting commit with a clean single commit based on current |
There was a problem hiding this comment.
Independent confirmation: I have an F1S V3 running here (Windows 11, Intel AX210, Intiface Central 3.1.1+43).
Commands land once they go to 0000fff2, so your endpoint conclusion is right.
I got there with a user config putting F1SV3 under lelo-harmony, which is the same two characteristics you reach through generic0 and txvibrate.
test_lelo_f1sv3.yaml matches what I see on the wire.
A few things from reading the diff:
-
lelo-f1sv3.ymluses36adf7ce-98bf-4fad-b916-b44d20a5d9e1for bothdefaults.idandconfigurations[0].id.load_user_configresolvesbase_idwithfind(|x| x.1.id() == base_id)over a HashMap, so two definitions sharing an id make that lookup order dependent. Keeping the old id on the configuration is the right half to keep, since existing user configs point at it, so the defaults block is the one that needs a new UUID. -
The defaults features reuse
90bd67a5-4601-4c49-97bb-0845ab7011baand05fc758b-a3fe-4156-b3ae-9cdcb9ae95c6, which are stilllelo-f1sv2's. Two protocols now ship the same feature UUIDs. -
With smoothing on, a zero speed returns no command and schedules the write 800 ms later, and the task swallows failures with
let _ =. An explicit StopDeviceCmd then doesn't stop the device for up to 800 ms, which is more than "smoothing" suggests to whoever turns it on. -
vibrate_smoothing_*goes onto the genericServerDeviceDefinitionand the published schema, and onlylelo_harmony.rsreads it. As its own PR it stands alone, and what's left here is a config move plus a small handler change, which is a far easier merge. -
f1sv3_harmony()is gated onprotocol_variant == "f1sv3", and no shipped YAML setsprotocol_variantoutsidevorze-sa.yml, so nothing reaches it unless a user writes the variant by hand. Theuse_harmonybranch inlelof1sv2.rsis fine by the way,txvibrateisfff2in that map too. -
lelo_harmony.rsandlelof1sv2.rscollapse the repo's one-import-per-line style.rustfmt.tomlsetsimports_layout = "HorizontalVertical", stablecargo fmtignores it silently, and the CI fmt check iscontinue-on-error: trueso it won't catch it.cargo +nightly fmtshould take that churn back out of the diff. -
Minor: in
maybe_defer_stop,let state = self.state.clone()shadows the MutexGuard of the same name, which stays alive to the end of the function. Fine today because the spawned task sleeps first.
For @qdot rather than for this PR: adding F1SV3 to lelo-harmony.yml with tx: 0000fff2 and whitelist: 00000a11 fixes the device with no Rust at all, since LeloHarmonyInitializer already runs the same handshake on Endpoint::Whitelist, which that map resolves to 00000a11.
That's the version I ran on hardware. It loses the separate protocol name and the smoothing knob, so it's a trade either way.
Summary
Root cause
F1SV3 advertises similarly to the existing F1S V2 entry, but tested hardware exposes Harmony-style control characteristics and does not respond to the F1S V2 motor payloads. The device vibrates with Harmony-style writes to the tx characteristic and requires a different zero-speed stop payload.
Testing